/**
	* Copyright (c) minuteproject, minuteproject@gmail.com
	* All rights reserved.
	* 
	* Licensed under the Apache License, Version 2.0 (the "License")
	* you may not use this file except in compliance with the License.
	* You may obtain a copy of the License at
	* 
	* http://www.apache.org/licenses/LICENSE-2.0
	* 
	* Unless required by applicable law or agreed to in writing, software
	* distributed under the License is distributed on an "AS IS" BASIS,
	* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	* See the License for the specific language governing permissions and
	* limitations under the License.
	* 
	* More information on minuteproject:
	* twitter @minuteproject
	* wiki http://minuteproject.wikispaces.com 
	* blog http://minuteproject.blogspot.net
	* 
*/
/**
	* template reference : 
	* - name : OpenxavaDomainObjectUML
	* - file name : DomainObjectUMLJPAAnnotationOXAnnotationV4.vm
*/
package sistema_oficial.sistema_oficial.domain.sistemaoficial;

//MP-MANAGED-ADDED-AREA-BEGINNING @import@
//MP-MANAGED-ADDED-AREA-ENDING @import@
import java.sql.*;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import java.util.Set;
import java.util.HashSet;

import javax.persistence.*;
import org.openxava.annotations.*;

import sistema_oficial.sistema_oficial.domain.sistemaoficial.MateriaPrima;
import sistema_oficial.sistema_oficial.domain.sistemaoficial.Medida;
import sistema_oficial.sistema_oficial.domain.sistemaoficial.SaleForzadoNivel1;

/**
 *
 * <p>Title: DetalleSaleForzadoNivel1</p>
 *
 * <p>Description: Domain Object describing a DetalleSaleForzadoNivel1 entity</p>
 *
 */
@Entity (name="DetalleSaleForzadoNivel1")
@Table (name="detalle_sale_forzado_nivel1")
@Views({
//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @view-base-detalle_sale_forzado_nivel1@
	@View(
		name="base",
		members=
        "" 	
        + "numero  ; "
        + "cantidad  ; "
        + "medidaIdentificador  ; "
        + "materiaPrimaIdentificador  ; "
        + "subtotal  ; "
        + "fechaVencimiento  ; "
        + "origen  ; "
        + "saleForzadoNivel1Identificador  ; "
		),
//MP-MANAGED-UPDATABLE-ENDING
	@View(
		name="Create", 
		extendsView="base"
	),
	@View(
		name="Update", 
		extendsView="base",
        members=
          "" 	
	),
	@View(extendsView="base",
        members=
          "" 	
	),
    @View(name="detalleSaleForzadoNivel1DEFAULT_VIEW", 
	   members=
          " numero ;" 	
        + "cantidad  ; "
        + "subtotal  ; "
        + "fechaVencimiento  ; "
        + "origen  ; "
	),
//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @view-reference-detalle_sale_forzado_nivel1@
    @View(name="reference", 
       extendsView="detalleSaleForzadoNivel1DEFAULT_VIEW"
//MP-MANAGED-UPDATABLE-ENDING
    )
})

@Tabs({
@Tab(
properties=
     " cantidad "
    +",  subtotal "
    +",  fechaVencimiento "
    +",  origen "
)
,
@Tab(
name = "DetalleSaleForzadoNivel1Tab",
properties=
     " cantidad "
    +",  subtotal "
    +",  fechaVencimiento "
    +",  origen "
)
,
@Tab(
name = "DetalleSaleForzadoNivel1TabWithRef",
properties=
     " cantidad "
    +",  subtotal "
    +",  fechaVencimiento "
    +",  origen "
)
})
//MP-MANAGED-ADDED-AREA-BEGINNING @class-annotation@
//MP-MANAGED-ADDED-AREA-ENDING @class-annotation@
public class DetalleSaleForzadoNivel1 {

    @Hidden @Id @Column(name="numero" )
    private Integer numero; 

//MP-MANAGED-ADDED-AREA-BEGINNING @cantidad-field-annotation@
//MP-MANAGED-ADDED-AREA-ENDING @cantidad-field-annotation@

//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @ATTRIBUTE-cantidad@
    @Column(name="cantidad",   nullable=false,  unique=false)
    @Required
    private java.math.BigDecimal cantidad;	
//MP-MANAGED-UPDATABLE-ENDING

//MP-MANAGED-ADDED-AREA-BEGINNING @subtotal-field-annotation@
//MP-MANAGED-ADDED-AREA-ENDING @subtotal-field-annotation@

//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @ATTRIBUTE-subtotal@
    @Column(name="subtotal",   nullable=false,  unique=false)
    @Required
    private java.math.BigDecimal subtotal;	
//MP-MANAGED-UPDATABLE-ENDING

//MP-MANAGED-ADDED-AREA-BEGINNING @fecha_vencimiento-field-annotation@
//MP-MANAGED-ADDED-AREA-ENDING @fecha_vencimiento-field-annotation@

//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @ATTRIBUTE-fecha_vencimiento@
    @Column(name="fecha_vencimiento",   nullable=false,  unique=false)
    @Required
    private Date fechaVencimiento;	
//MP-MANAGED-UPDATABLE-ENDING

//MP-MANAGED-ADDED-AREA-BEGINNING @origen-field-annotation@
//MP-MANAGED-ADDED-AREA-ENDING @origen-field-annotation@

//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @ATTRIBUTE-origen@
    @Column(name="origen",   nullable=false,  unique=false)
    @Required
    private Integer origen;	
//MP-MANAGED-UPDATABLE-ENDING


//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @parent-MateriaPrima-detalle_sale_forzado_nivel1@
    @ManyToOne (fetch=FetchType.LAZY ,optional=false) //remove optional=false to aggragate but leads to a side effect when going directly to the entity: required check is not performed=> if no set DB check constraint is raised...
    @JoinColumn(name="materia_prima_identificador", nullable=false,  unique=false  )
    @ReferenceView ("reference") 
    private MateriaPrima materiaPrimaIdentificador; 
    
//MP-MANAGED-UPDATABLE-ENDING
//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @parent-Medida-detalle_sale_forzado_nivel1@
    @ManyToOne (fetch=FetchType.LAZY ,optional=false) //remove optional=false to aggragate but leads to a side effect when going directly to the entity: required check is not performed=> if no set DB check constraint is raised...
    @JoinColumn(name="medida_identificador", nullable=false,  unique=false  )
    @ReferenceView ("reference") 
    private Medida medidaIdentificador; 
    
//MP-MANAGED-UPDATABLE-ENDING
//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @parent-SaleForzadoNivel1-detalle_sale_forzado_nivel1@
    @ManyToOne (fetch=FetchType.LAZY ,optional=false) //remove optional=false to aggragate but leads to a side effect when going directly to the entity: required check is not performed=> if no set DB check constraint is raised...
    @JoinColumn(name="sale_forzado_nivel1_identificador", nullable=false,  unique=false  )
    @ReferenceView ("reference") 
    private SaleForzadoNivel1 saleForzadoNivel1Identificador; 
    
//MP-MANAGED-UPDATABLE-ENDING
//children
//m2m
    /**
    * Default constructor
    */
    public DetalleSaleForzadoNivel1() {
    }


    public Integer getNumero() {
        return numero;
    }
	
    public void setNumero (Integer numero) {
        this.numero =  numero;
    }
    

//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @GETTER-SETTER-cantidad@
    public java.math.BigDecimal getCantidad() {
        return cantidad;
    }
	
    public void setCantidad (java.math.BigDecimal cantidad) {
        this.cantidad =  cantidad;
    } 
//MP-MANAGED-UPDATABLE-ENDING

//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @GETTER-SETTER-subtotal@
    public java.math.BigDecimal getSubtotal() {
        return subtotal;
    }
	
    public void setSubtotal (java.math.BigDecimal subtotal) {
        this.subtotal =  subtotal;
    } 
//MP-MANAGED-UPDATABLE-ENDING

//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @GETTER-SETTER-fecha_vencimiento@
    public Date getFechaVencimiento() {
        return fechaVencimiento;
    }
	
    public void setFechaVencimiento (Date fechaVencimiento) {
        this.fechaVencimiento =  fechaVencimiento;
    } 
//MP-MANAGED-UPDATABLE-ENDING

//MP-MANAGED-UPDATABLE-BEGINNING-DISABLE @GETTER-SETTER-origen@
    public Integer getOrigen() {
        return origen;
    }
	
    public void setOrigen (Integer origen) {
        this.origen =  origen;
    } 
//MP-MANAGED-UPDATABLE-ENDING


    public MateriaPrima getMateriaPrimaIdentificador () {  //
    	return materiaPrimaIdentificador;
    }
	
    public void setMateriaPrimaIdentificador (MateriaPrima materiaPrimaIdentificador) {
    	this.materiaPrimaIdentificador = materiaPrimaIdentificador;//this.materiaPrimaIdentificador = materiaPrima;
    }
    public Medida getMedidaIdentificador () {  //
    	return medidaIdentificador;
    }
	
    public void setMedidaIdentificador (Medida medidaIdentificador) {
    	this.medidaIdentificador = medidaIdentificador;//this.medidaIdentificador = medida;
    }
    public SaleForzadoNivel1 getSaleForzadoNivel1Identificador () {  //
    	return saleForzadoNivel1Identificador;
    }
	
    public void setSaleForzadoNivel1Identificador (SaleForzadoNivel1 saleForzadoNivel1Identificador) {
    	this.saleForzadoNivel1Identificador = saleForzadoNivel1Identificador;//this.saleForzadoNivel1Identificador = saleForzadoNivel1;
    }




//MP-MANAGED-ADDED-AREA-BEGINNING @implementation@
//MP-MANAGED-ADDED-AREA-ENDING @implementation@

}
